package com.ycd.gis.service.impl;

import java.util.List;
import com.ycd.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ycd.gis.mapper.GisMarkerRecordMapper;
import com.ycd.gis.domain.GisMarkerRecord;
import com.ycd.gis.service.IGisMarkerRecordService;
import com.ycd.common.core.text.Convert;

/**
 * 标记记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-02
 */
@Service
public class GisMarkerRecordServiceImpl implements IGisMarkerRecordService 
{
    @Autowired
    private GisMarkerRecordMapper gisMarkerRecordMapper;

    /**
     * 查询标记记录
     * 
     * @param id 标记记录主键
     * @return 标记记录
     */
    @Override
    public GisMarkerRecord selectGisMarkerRecordById(Long id)
    {
        return gisMarkerRecordMapper.selectGisMarkerRecordById(id);
    }

    /**
     * 查询标记记录列表
     * 
     * @param gisMarkerRecord 标记记录
     * @return 标记记录
     */
    @Override
    public List<GisMarkerRecord> selectGisMarkerRecordList(GisMarkerRecord gisMarkerRecord)
    {
        return gisMarkerRecordMapper.selectGisMarkerRecordList(gisMarkerRecord);
    }

    /**
     * 新增标记记录
     * 
     * @param gisMarkerRecord 标记记录
     * @return 结果
     */
    @Override
    public int insertGisMarkerRecord(GisMarkerRecord gisMarkerRecord)
    {
        gisMarkerRecord.setCreateTime(DateUtils.getNowDate());
        return gisMarkerRecordMapper.insertGisMarkerRecord(gisMarkerRecord);
    }

    /**
     * 修改标记记录
     * 
     * @param gisMarkerRecord 标记记录
     * @return 结果
     */
    @Override
    public int updateGisMarkerRecord(GisMarkerRecord gisMarkerRecord)
    {
        gisMarkerRecord.setUpdateTime(DateUtils.getNowDate());
        return gisMarkerRecordMapper.updateGisMarkerRecord(gisMarkerRecord);
    }

    /**
     * 批量删除标记记录
     * 
     * @param ids 需要删除的标记记录主键
     * @return 结果
     */
    @Override
    public int deleteGisMarkerRecordByIds(String ids)
    {
        return gisMarkerRecordMapper.deleteGisMarkerRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除标记记录信息
     * 
     * @param id 标记记录主键
     * @return 结果
     */
    @Override
    public int deleteGisMarkerRecordById(Long id)
    {
        return gisMarkerRecordMapper.deleteGisMarkerRecordById(id);
    }
}
